// 引用 vue 没什么要说的
import Vue from 'vue';
import App from './App.vue'
import router from './router'
import axios from "axios"
import Axios from "./utils/Axios"

import  { ToastPlugin,LoadingPlugin ,AlertPlugin} from 'vux'
// 引入对象深度copy工具
import DeepExtend from "deep-extend";
import CarModelUtils from "./data/CarModel";
// 入口文件为 src/App.vue 文件 所以要引用

//添加Fastclick移除移动端点击延迟
const FastClick = require('fastclick');
FastClick.attach(document.body);

Vue.use(LoadingPlugin);
Vue.use(ToastPlugin);
Vue.use(AlertPlugin);
// 将Axios方法绑定到全局
Vue.prototype.$axios = axios;
// VIN对应车型获取工具
Vue.prototype.$CMUtils = CarModelUtils;
// 将DeepExtend方法绑定到全局
Vue.prototype.$deepExtend = DeepExtend;

console.log("baseURL is: %s", process.env.CONTEXT);
Axios.init({baseURL: process.env.CONTEXT, unauthorizedUrl: "#/login"});

Vue.config.productionTip = false


// run起来吧
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: {App}
});
